const initState = {
  milk: 0,
};

function reducer(state = initState, action) {
  switch (action.type) {
    case 'PUT_MILK':
      return { ...state, milk: state.milk + action.count };
    case 'TAKE_MILK':
      return { ...state, milk: state.milk - action.count };
    default:
      return state;
  }
}
let store = Redux.createStore(reducer);
store.subscribe(() => console.log(store.getState()));
// console.log(store);
console.log(store.getState());
// store.dispatch({ type: 'PUT_MILK', count: 1 }); //mikg:1
